home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / untcnvrs.sit / Unit Conversion / card_4416.txt < prev    next >
Text File  |  1990-11-02  |  10KB  |  405 lines

  1. -- card: 4416 from stack: in
  2. -- bmap block id: 7380
  3. -- flags: 0000
  4. -- background id: 3044
  5. -- name: Distance
  6. ----- HyperTalk script -----
  7. on closeCard
  8.   put empty into background field "toconvert"
  9.   put empty into background field "answer"
  10. end closeCard
  11.  
  12.  
  13.  
  14. -- part 15 (button)
  15. -- low flags: 00
  16. -- high flags: A003
  17. -- rect: left=286 top=49 right=76 bottom=467
  18. -- title width / last selected line: 0
  19. -- icon id / first selected line: 0 / 0
  20. -- text alignment: 1
  21. -- font id: 0
  22. -- text size: 12
  23. -- style flags: 0
  24. -- line height: 16
  25. -- part name: Centimeters to Inches
  26. ----- HyperTalk script -----
  27. on mouseUp
  28.   set numberformat to 0.000
  29.   put empty into background field "answer"
  30.   get first word of background field "toconvert"
  31.   put it into temp
  32.   if temp is "-" then
  33.     get second word of background field "toconvert"
  34.     divide it by -1
  35.     put it into temp
  36.   end if
  37.   put empty into background field "toconvert"
  38.   if temp is empty then
  39.     put temp && "0 Centimeters" into background field "toconvert"
  40.   else
  41.     put temp && " Centimeter" into background field "toconvert"
  42.   end if
  43.   divide temp by 2.540
  44.   put temp && " Inches" into background field "answer"
  45.   put empty into temp
  46. end mouseUp
  47.  
  48.  
  49.  
  50. -- part 16 (button)
  51. -- low flags: 00
  52. -- high flags: A003
  53. -- rect: left=287 top=77 right=104 bottom=468
  54. -- title width / last selected line: 0
  55. -- icon id / first selected line: 0 / 0
  56. -- text alignment: 1
  57. -- font id: 0
  58. -- text size: 12
  59. -- style flags: 0
  60. -- line height: 16
  61. -- part name: Inches to Centimeters
  62. ----- HyperTalk script -----
  63. on mouseUp
  64.   set numberformat to 0.000
  65.   put empty into background field "answer"
  66.   get first word of background field "toconvert"
  67.   put it into temp
  68.   if temp is "-" then
  69.     get second word of background field "toconvert"
  70.     divide it by -1
  71.     put it into temp
  72.   end if
  73.   put empty into background field "toconvert"
  74.   if temp is empty then
  75.     put temp && "0 Inches" into background field "toconvert"
  76.   else
  77.     put temp && " Inches" into background field "toconvert"
  78.   end if
  79.   multiply temp by 2.540
  80.   put temp && " Centimeters" into background field "answer"
  81.   put empty into temp
  82. end mouseUp
  83.  
  84.  
  85.  
  86. -- part 17 (button)
  87. -- low flags: 00
  88. -- high flags: A003
  89. -- rect: left=288 top=111 right=138 bottom=469
  90. -- title width / last selected line: 0
  91. -- icon id / first selected line: 0 / 0
  92. -- text alignment: 1
  93. -- font id: 0
  94. -- text size: 12
  95. -- style flags: 0
  96. -- line height: 16
  97. -- part name: Meters to Feet
  98. ----- HyperTalk script -----
  99. on mouseUp
  100.   set numberformat to 0.000
  101.   put empty into background field "answer"
  102.   get first word of background field "toconvert"
  103.   put it into temp
  104.   if temp is "-" then
  105.     get second word of background field "toconvert"
  106.     divide it by -1
  107.     put it into temp
  108.   end if
  109.   put empty into background field "toconvert"
  110.   if temp is empty then
  111.     put temp && "0 Meters" into background field "toconvert"
  112.   else
  113.     put temp && " Meters" into background field "toconvert"
  114.   end if
  115.   multiply temp by 3.281
  116.   put temp && " Feet" into background field "answer"
  117.   put empty into temp
  118. end mouseUp
  119.  
  120.  
  121.  
  122. -- part 19 (button)
  123. -- low flags: 00
  124. -- high flags: A003
  125. -- rect: left=288 top=139 right=166 bottom=469
  126. -- title width / last selected line: 0
  127. -- icon id / first selected line: 0 / 0
  128. -- text alignment: 1
  129. -- font id: 0
  130. -- text size: 12
  131. -- style flags: 0
  132. -- line height: 16
  133. -- part name: Feet to Meters
  134. ----- HyperTalk script -----
  135. on mouseUp
  136.   set numberformat to 0.000
  137.   put empty into background field "answer"
  138.   get first word of background field "toconvert"
  139.   put it into temp
  140.   if temp is "-" then
  141.     get second word of background field "toconvert"
  142.     divide it by -1
  143.     put it into temp
  144.   end if
  145.   put empty into background field "toconvert"
  146.   if temp is empty then
  147.     put temp && "0 Feet" into background field "toconvert"
  148.   else
  149.     put temp && " Feet" into background field "toconvert"
  150.   end if
  151.   divide temp by 3.281
  152.   put temp && " Meters" into background field "answer"
  153.   put empty into temp
  154. end mouseUp
  155.  
  156.  
  157.  
  158. -- part 20 (button)
  159. -- low flags: 00
  160. -- high flags: A003
  161. -- rect: left=288 top=172 right=199 bottom=469
  162. -- title width / last selected line: 0
  163. -- icon id / first selected line: 0 / 0
  164. -- text alignment: 1
  165. -- font id: 0
  166. -- text size: 12
  167. -- style flags: 0
  168. -- line height: 16
  169. -- part name: Meters to Yards
  170. ----- HyperTalk script -----
  171. on mouseUp
  172.   set numberformat to 0.000
  173.   put empty into background field "answer"
  174.   get first word of background field "toconvert"
  175.   put it into temp
  176.   if temp is "-" then
  177.     get second word of background field "toconvert"
  178.     divide it by -1
  179.     put it into temp
  180.   end if
  181.   put empty into background field "toconvert"
  182.   if temp is empty then
  183.     put temp && "0 Meters" into background field "toconvert"
  184.   else
  185.     put temp && " Meters" into background field "toconvert"
  186.   end if
  187.   multiply temp by 1.0936
  188.   put temp && " Yards" into background field "answer"
  189.   put empty into temp
  190. end mouseUp
  191.  
  192.  
  193.  
  194. -- part 21 (button)
  195. -- low flags: 00
  196. -- high flags: A003
  197. -- rect: left=289 top=201 right=228 bottom=470
  198. -- title width / last selected line: 0
  199. -- icon id / first selected line: 0 / 0
  200. -- text alignment: 1
  201. -- font id: 0
  202. -- text size: 12
  203. -- style flags: 0
  204. -- line height: 16
  205. -- part name: Yards to Meters
  206. ----- HyperTalk script -----
  207. on mouseUp
  208.   set numberformat to 0.000
  209.   put empty into background field "answer"
  210.   get first word of background field "toconvert"
  211.   put it into temp
  212.   if temp is "-" then
  213.     get second word of background field "toconvert"
  214.     divide it by -1
  215.     put it into temp
  216.   end if
  217.   put empty into background field "toconvert"
  218.   if temp is empty then
  219.     put temp && "0 Yards" into background field "toconvert"
  220.   else
  221.     put temp && " Yards" into background field "toconvert"
  222.   end if
  223.   divide temp by 1.0936
  224.   put temp && " Meters" into background field "answer"
  225.   put empty into temp
  226. end mouseUp
  227.  
  228.  
  229.  
  230. -- part 22 (button)
  231. -- low flags: 00
  232. -- high flags: A003
  233. -- rect: left=289 top=231 right=258 bottom=470
  234. -- title width / last selected line: 0
  235. -- icon id / first selected line: 0 / 0
  236. -- text alignment: 1
  237. -- font id: 0
  238. -- text size: 12
  239. -- style flags: 0
  240. -- line height: 16
  241. -- part name: Kilometers to Miles
  242. ----- HyperTalk script -----
  243. on mouseUp
  244.   set numberformat to 0.000
  245.   put empty into background field "answer"
  246.   get first word of background field "toconvert"
  247.   put it into temp
  248.   if temp is "-" then
  249.     get second word of background field "toconvert"
  250.     divide it by -1
  251.     put it into temp
  252.   end if
  253.   put empty into background field "toconvert"
  254.   if temp is empty then
  255.     put temp && "0 Kilometers" into background field "toconvert"
  256.   else
  257.     put temp && " Kilometers" into background field "toconvert"
  258.   end if
  259.   multiply temp by 0.6214
  260.   put temp && " Miles" into background field "answer"
  261.   put empty into temp
  262. end mouseUp
  263.  
  264.  
  265.  
  266. -- part 23 (button)
  267. -- low flags: 00
  268. -- high flags: A003
  269. -- rect: left=290 top=259 right=286 bottom=471
  270. -- title width / last selected line: 0
  271. -- icon id / first selected line: 0 / 0
  272. -- text alignment: 1
  273. -- font id: 0
  274. -- text size: 12
  275. -- style flags: 0
  276. -- line height: 16
  277. -- part name: Miles to Kilometers
  278. ----- HyperTalk script -----
  279. on mouseUp
  280.   set numberformat to 0.000
  281.   put empty into background field "answer"
  282.   get first word of background field "toconvert"
  283.   put it into temp
  284.   if temp is "-" then
  285.     get second word of background field "toconvert"
  286.     divide it by -1
  287.     put it into temp
  288.   end if
  289.   put empty into background field "toconvert"
  290.   if temp is empty then
  291.     put temp && "0 Miles" into background field "toconvert"
  292.   else
  293.     put temp && " Miles" into background field "toconvert"
  294.   end if
  295.   divide temp by 0.6214
  296.   put temp && " Kilometers" into background field "answer"
  297.   put empty into temp
  298. end mouseUp
  299.  
  300.  
  301.  
  302. -- part 28 (button)
  303. -- low flags: 00
  304. -- high flags: A003
  305. -- rect: left=289 top=292 right=319 bottom=470
  306. -- title width / last selected line: 0
  307. -- icon id / first selected line: 0 / 0
  308. -- text alignment: 1
  309. -- font id: 0
  310. -- text size: 12
  311. -- style flags: 0
  312. -- line height: 16
  313. -- part name: Additional Notes
  314. ----- HyperTalk script -----
  315. on mouseUp
  316.   visual effect zoom open
  317.   go to card addinfo
  318. end mouseUp
  319.  
  320.  
  321.  
  322. -- part 41 (button)
  323. -- low flags: 00
  324. -- high flags: 2000
  325. -- rect: left=75 top=306 right=323 bottom=134
  326. -- title width / last selected line: 0
  327. -- icon id / first selected line: 0 / 0
  328. -- text alignment: 1
  329. -- font id: 0
  330. -- text size: 12
  331. -- style flags: 0
  332. -- line height: 16
  333. -- part name: Temperature
  334. ----- HyperTalk script -----
  335. on mouseUp
  336.   visual effect zoom open
  337.   go to card weight
  338. end mouseUp
  339.  
  340.  
  341.  
  342. -- part 42 (button)
  343. -- low flags: 00
  344. -- high flags: 2000
  345. -- rect: left=135 top=306 right=323 bottom=194
  346. -- title width / last selected line: 0
  347. -- icon id / first selected line: 0 / 0
  348. -- text alignment: 1
  349. -- font id: 0
  350. -- text size: 12
  351. -- style flags: 0
  352. -- line height: 16
  353. -- part name: Temperature
  354. ----- HyperTalk script -----
  355. on mouseUp
  356.   visual effect zoom open
  357.   go to card temperature
  358. end mouseUp
  359.  
  360.  
  361.  
  362. -- part 43 (button)
  363. -- low flags: 00
  364. -- high flags: 2000
  365. -- rect: left=76 top=288 right=304 bottom=135
  366. -- title width / last selected line: 0
  367. -- icon id / first selected line: 0 / 0
  368. -- text alignment: 1
  369. -- font id: 0
  370. -- text size: 12
  371. -- style flags: 0
  372. -- line height: 16
  373. -- part name: Area
  374. ----- HyperTalk script -----
  375. on mouseUp
  376.   visual effect zoom open
  377.   go to card Area
  378. end mouseUp
  379.  
  380.  
  381.  
  382. -- part 44 (button)
  383. -- low flags: 00
  384. -- high flags: 2000
  385. -- rect: left=135 top=288 right=305 bottom=194
  386. -- title width / last selected line: 0
  387. -- icon id / first selected line: 0 / 0
  388. -- text alignment: 1
  389. -- font id: 0
  390. -- text size: 12
  391. -- style flags: 0
  392. -- line height: 16
  393. -- part name: Volume
  394. ----- HyperTalk script -----
  395. on mouseUp
  396.   visual effect zoom open
  397.   go to card Volume
  398. end mouseUp
  399.  
  400.  
  401.  
  402. -- part contents for background part 7
  403. ----- text -----
  404. Distance
  405. Conversions